% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ejam2shapefile.R
\name{ejam2shapefile}
\alias{ejam2shapefile}
\title{DRAFT - export EJAM results as shapefile/geojson/kml for use in ArcPro, EJScreen, etc.}
\usage{
ejam2shapefile(
  ejamitout,
  fname = "EJAM_results_bysite_date_time.geojson",
  folder = tempdir(),
  save = TRUE,
  crs = 4269,
  shortcolnames = TRUE,
  varnames = "basic250",
  sf_data.frame = NULL
)
}
\arguments{
\item{ejamitout}{output of EJAM such as from \code{\link[=ejamit]{ejamit()}}}

\item{fname}{optional filename with no path, with extension one of "geojson"/"json", "shp", "kml"
Ignored if save=F.}

\item{folder}{optional - If omitted (and not running in shiny and if interactive() mode),
this function prompts you to specify the folder where the file should be saved.
If omitted and not running in shiny or not interactive() mode, it uses tempdir().
Ignored if save=F.}

\item{save}{whether to save file - if FALSE, it returns the object not the file path}

\item{crs}{optional coord ref system}

\item{shortcolnames}{Whether to cut colnames to 10 characters only if using .shp format}

\item{varnames}{optional vector of which colnames of ejamitout$results_bysite
to include in shapefile. DJefault is all other than averages, ratios, and raw EJ scores.
Can be "all" or NULL to include all columns.}

\item{sf_data.frame}{data.frame that is also "sf" class, with "geometry" column for mapping,
rows exactly corresponding to those in ejamitout$results_bysite}
}
\value{
path to saved file
}
\description{
DRAFT - export EJAM results as shapefile/geojson/kml for use in ArcPro, EJScreen, etc.
}
\details{
FIELD NAMES (indicator names) CURRENTLY ARE TRUNCATED AND NUMBERED TO BE ONLY 10 CHARACTERS MAX.

see
\href{https://doc.arcgis.com/en/arcgis-online/reference/shapefiles.htm}{Shapefile format basics from arcgis.com}
}
\examples{
\dontrun{
  # folder = getwd()
  # out <- ejamit(testpoints_100 , radius = 3.1)
  # fname <- ejam2shapefile(out, "test100_3miles.geojson", folder = folder)
  
  out <- testoutput_ejamit_10pts_1miles
  fname <- ejam2shapefile(out)
  shp <- shapefile_from_any(fname)
  map_shapes_leaflet(shp)
  }
}
